package torrentfile;

import java.util.ArrayList;

public class InfoForSeveralFiles extends Info {
	private ArrayList<FileInfo> m_files_info;
	private String m_root;
	
	// Constructors
	public InfoForSeveralFiles(ArrayList<FileInfo> filesInfo,String root,
			int pieceLength, String pieces, String source) {
		super(pieceLength, pieces, source);
		setFilesInfo(filesInfo);
		setRoot(root);
	}
	
	public InfoForSeveralFiles(ArrayList<FileInfo> filesInfo, String root, 
			int pieceLength, String pieces, boolean priv, String source) {
		super(pieceLength, pieces, priv, source);
		setFilesInfo(filesInfo);
		setRoot(root);
	}
	
	// Accessors
	public String getRoot() {
		return m_root;
	}
	public void setRoot(String root) {
		this.m_root = root;
	}
	
	public ArrayList<FileInfo> getFilesInfo() {
		return m_files_info;
	}
	public void setFilesInfo(ArrayList<FileInfo> filesInfo) {
		this.m_files_info = filesInfo;
	}
	
	public FileInfo getFileInfo(int index) {
		return m_files_info.get(index);
	}
	public void setFileInfo(int index, FileInfo fileInfo) {
		this.m_files_info.set(index, fileInfo);
	}
}
